#include <stdio.h>
#include "algslib.h"
#include "resizingStack.h"
#include <stdlib.h>

int main(int argc, char* argv[])
{
    if(argc != 2)
    {
        return -1;
    }
    else
    {
        char *pfilename = argv[1];
        FILE *pfile = fopen(pfilename, "r+");
        if(pfile == NULL)
        {
            return -1;
        }
        //fputs("hello!",pfile);
        char *pbuffer = NULL;
        pbuffer = (char*)calloc(sizeof(char), 80);
        while(fgets(pbuffer, 80, pfile))
        {
            printf("\n%s\n", pbuffer);
        }
        fclose(pfile);
    }
    return 0;
}
